#include<cstring>
#include <iostream>
using namespace std;
//---------------基类--------------

class Mobile
{
private:
  char mynumber[11];

public:
  void init(char number[11]);
  void dial(char *);
  void answer(char othernumber[11]);
  void hangup() { cout << "hanging ip..." << endl; }
  void show() { cout << "my number is " << mynumber << endl; }
};

//设置本机号码，默认00000000
void Mobile::init(char number[11]="0000000000")
{
  strcpy(mynumber, number);
}

void Mobile::dial(char *number)
{
  cout << "dialing number is " << number << endl;
  cout << "dialing on..." << endl;
}

void Mobile::answer(char othernumber[11])
{
  cout << "answering number is " << othernumber << endl;
  cout << "answering in..." << endl;
}

